package com.xinchengxd.order.mapper;

import com.xinchengxd.commons.entity.order.Order;
import com.xinchengxd.commons.entity.order.OrderItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(rollbackFor = Exception.class)
public interface OrderMapper {
    int saveOrder(@Param("o") Order order);

    int saveItem(List<OrderItem> items);

    @Select("select STATUS from mall_order where order_no = #{orderNo}")
    String isPay(String orderNo);
}
